<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title>JSON</title>
	</head>
	<body>
		<h1>JSON对象创建</h1>
		<script>
			person = {
				name:'Jack',
				age:20,
				addr:{
					homeAddr:'河南信阳',
					workAddr:'江苏常州'
				}
			};
			alert(person.addr.homeAddr);
			alert(person['age']);
			students = [
			   {
			   	name:'war',
			   	age:'23'
			   },
			   {
			   	name:'wyh',
			   	age:'34'
			   }
			];
			alert(students[1].age);
			s = {
    "sites": [
    { "name":"菜鸟教程" , "url":"www.runoob.com" }, 
    { "name":"google" , "url":"www.google.com" }, 
    { "name":"微博" , "url":"www.weibo.com" }
    ]
}
		</script>
	</body>
</html>
